Understanding font-style, font-variant, and font-weight in CSS
CSS provides several properties to control the appearance of text. font-style, font-variant, and font-weight each serve distinct purposes.
font-style – Controls the slant of text.
normal (default), italic, oblique.font-variant – Controls the use of alternate glyphs such as small-caps.
normal, small-caps.font-weight – Controls the thickness or boldness of text.
normal (400), bold (700), 100-900 for fine-grained control.In this example, each property independently affects the text: italics for slant, small-caps for typographic style, and font-weight for thickness.
font-style is for slanting text (italic, oblique).
font-variant is for typographic alternates like small-caps.
font-weight is for boldness or lightness of text.
These properties can be combined for richer text styling.
Always use semantic HTML (<em>, <strong>) with CSS for accessible emphasis.